﻿@model Property4U.Models.Response

@{
    ViewBag.Title = "Create";
}

<div class="row">
    <!-- Page Header -->
    <div class="col-lg-12">
        <h1 class="page-header">@ViewBag.Title</h1>
    </div>
    <!--End Page Header -->
</div>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Reponse</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model.RequestID, "RequestID", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("RequestID", (SelectList)ViewBag.RequestIDList, String.Empty, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.RequestID, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.AgentID, "AgentID", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("AgentID", (SelectList)ViewBag.AgentIDList, String.Empty, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AgentID, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ResponseOn, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ResponseOn, new { htmlAttributes = new { @class = "form-control", @Value = ViewBag.ResponseOn, @readonly = "readonly" } })
                @Html.ValidationMessageFor(model => model.ResponseOn, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ResponseStatus, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EnumDropDownListFor(model => model.ResponseStatus, "Agree", htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.ResponseStatus, "", new { @class = "text-danger" })
            </div>
        </div>

        @Html.HiddenFor(model => model.LastEdit)

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@*<script type="text/javascript">
    $(function () {
        $("#ResponseStatus").attr("disabled", "disabled");
    $('#myID').submit(function () {
                $("#ResponseStatus").removeAttr("disabled");
    });
});
</script>*@